How to find first element of array matching a boolean condition in JavaScript

visit shbcf.ru